<template>
  <van-nav-bar title="我的" />

  <!-- https://vant.pro/vant/#/zh-CN/cell -->

  <div>
    <van-image
      round
      width="100px"
      height="100px"
      src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
    />
  </div>
  <van-cell-group inset>
    <van-cell title="单元格" value="内容" />
    <van-cell title="单元格" value="内容" label="描述信息" />

    <van-cell title="路由跳转" is-link to="/userInfo">
      <!-- 使用 title 插槽来自定义标题 -->
      <template #title>
        <van-icon name="setting-o" />

        <span class="custom-title">设置</span>
      </template>
    </van-cell>
  </van-cell-group>

  <van-button type="danger" block @click="loginOut()">退出</van-button>
</template>

<script setup>
import router from "@/router";

function loginOut() {
  localStorage.removeItem("xx-mall-token");
  router.push("/");
}
</script>

<style></style>
